CCM.three_body_utils¶
Provides functions for all of the 3 body interactions
Functions
|
This routine takes the relatively small number of three-body matrix elements in mycontact and sorts them into the four-indexed interaction tensors. |
|
returns normal-ordering contributions to the reference energy |
|
gets the normal-ordering contributions of the three-body potential to the Fock matrix |
|
Finds the normal-ordering contributions of the three-body potential to the two-body matrix elements |
|
orders tuple into right order, i.e. "p" before "h" this function is used by the function get_3NF. |
- CCM.three_body_utils.get_3NF(part, hole, my3body)¶
This routine takes the relatively small number of three-body matrix elements in mycontact and sorts them into the four-indexed interaction tensors. It also anti-symmetrizes the latter whenin and out indices run over the same set of particle/hole indices. The whole thing is a bit tedious but much faster than the function load2bme
- Parameters:
part (list[int]) – list of particle-space indices
hole (list[int]) – list of hole-space indices
my3body (list[(int, int, int, int, int, int, float)]) – list of three-body matrix elements
- Returns:
w_ppp_pph, w_ppp_phh, w_pph_pph, w_ppp_hhh, w_pph_phh, w_pph_hhh, w_phh_phh, w_phh_hhh, w_hhh_hhh as lists of nonzeros
- Return type:
9 list[(int, int, int, int, int, int, float)]
- CCM.three_body_utils.order_state(ket, lookup_p, lookup_h, i1, i2, i3)¶
orders tuple into right order, i.e. “p” before “h” this function is used by the function get_3NF
- Parameters:
ket ((str, str, str)) – ket to be used in finding the right particle hole index
lookup_p (dict(int, int)) – dictionary to lookup the index of particles
lookup_h (dict(int, int)) – dictionary to lookup the index of holes
i1 (int) – index of first particle/hole
i2 (int) – index of second particle/hole
i3 (int) – index of third particle/hole
- Returns:
the correctly ordered result looking like ket, the sign of the permutation that achieved this, and the list of three single-particle indices
- Return type:
tuple(str, str, str), float, list[(int, int, int)]
- CCM.three_body_utils.get_3NF_Eref(w_hhh_hhh)¶
returns normal-ordering contributions to the reference energy
- Parameters:
w_hhh_hhh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction W^{ijk}_{lmn}
- Returns:
contribution to the reference energy from the normal ordered three nucleon force
- Return type:
float
- CCM.three_body_utils.get_3NF_fock(hnum, pnum, w_phh_phh, w_phh_hhh, w_hhh_hhh)¶
gets the normal-ordering contributions of the three-body potential to the Fock matrix
- Parameters:
hnum (int) – number of hole states
pnum (int) – number of particle states
w_phh_phh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{aij}_{bkl}
w_phh_hhh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{aij}_{klm}
w_hhh_hhh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{ijk}_{lmn}
- Returns:
contributions to the normal ordered one body matrices
- Return type:
numpy array, numpy array, numpy array
- CCM.three_body_utils.get_3NF_tbme(w_pph_pph, w_pph_phh, w_pph_hhh, w_phh_phh, w_phh_hhh, w_hhh_hhh, pnum, hnum, sparse_pppp=True, sparse_ppph=True)¶
Finds the normal-ordering contributions of the three-body potential to the two-body matrix elements
- Parameters:
w_pph_pph (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{abi}_{cdj}
w_pph_phh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{acj}_{bkl}
w_phh_phh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{aij}_{bkl}
w_phh_hhh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{aij}_{klm}
w_hhh_hhh (list[(int, int, int, int, int, int, float)]) – nonzero elements of the three body interaction matrix W^{ijk}_{lmn}
hnum (int) – number of hole states
pnum (int) – number of particle states
sparse_pppp (bool) – Optional; whether or not v_pppp should be stored as sparse or not
sparse_ppph (bool) – Optional; whether or not v_ppph should be stored as sparse or not
- Returns:
contributions to the normal ordered two body matrices
- Return type:
numpy array, numpy array, numpy array, numpy array, numpy array, numpy array